import type { RouteRecordRaw } from 'vue-router'

// 路由配置接口
export type AppRouteRecordRaw = {
  path: string
  name: string
  component: (() => Promise<any>) | any
  redirect?: string
  meta?: {
    title?: string
    icon?: string
    hidden?: boolean
    permissions?: string[]
  }
  children?: AppRouteRecordRaw[]
}

// 组件映射表
export const componentMap: Record<string, () => Promise<any>> = {
  Layout: () => import('@/layout/index.vue'),
  // 系统管理
  'system_user': () => import('@/views/system/user/index.vue'),
  'system_role': () => import('@/views/system/role/index.vue'),
  'system_org': () => import('@/views/system/org/index.vue'),
  'system_position': () => import('@/views/system/position/index.vue'),
  'system_res': () => import('@/views/system/res/index.vue'),
  'system_dict': () => import('@/views/system/dict/index.vue'),
} 